home *** CD-ROM | disk | FTP | other *** search
- /*
- © 1989 Apple Computer, Inc. by Ricardo Batista
-
- EZ_ADSP driver interface version 1.0, March 6 1989.
-
- The ez_adsp driver loads itself automatically in any machine, then it loads an
- STR with id 268 to be used as the 'type' registered in the network. STR 269 is
- loaded as the name of a desk accessory to be opened when a connection is
- detected (and the name is not null). To open the ez_adsp driver issue an
- OpenDriver("\p.ez_adsp",&refNum); call, when you are done with it don't close
- the driver.
- */
-
-
- /*
- Structure used to give information about a file transfer follows. The driver
- recognizes a file transfer when two empty messages are sent with the EOM bit
- set and the next message (with the EOM bit set) is the following structure.
- Only the size of the structure is checked and if it matches a file transfer
- is assumed. Following the file information message is the data fork with the
- EOM bit set at the end, then the resource fork is sent again with the EOM bit
- set at the end. Notice that if either fork is empty only an EOM bit constitutes
- the message.
- */
-
-
- typedef struct {
- char file_name[66];
- OSType file_creator;
- OSType file_type;
- long data_len;
- long res_len;
- int finder_flags;
- int info;
- } file_info;
-
- /* Control call csCode's to the ez_adsp driver */
-
-
- #define openConn 100
- #define closeConn 101
- #define autoFile 102
- #define sendFile 103
- #define disable 104
- #define enable 105
- #define deskFlag 106
-
-
-
- /*
- openConn, opening a connection, csParam[0]-[1] contains an AddrBlock to connect to
- closeConn, closes a connection and starts waiting for a remote connection if we are
- enabled to answer a call, default is enabled.
- autoFile, csParam[0] contains a flag to set the autoFile parameter, if true the
- driver recognizes a file transfer and saves the received file in the
- disk the user selects. False by default.
- sendFile, this takes a pointer to a file name in csParam[0]-[1], and a volume
- reference number in csParam[2], the file is then transfered to the remote
- connection.
- disable, disables answering to a remote connection.
- enable, enables answering to a remote connection, default.
- deskFlag, sets the desk accesory opened flag to csParam[0], if false, then as soon
- as a connection is detected the desk accessory who's name was stored in
- the resource STR 269 (if any) is opened, then the flag is set to true.
- /*
-
-
- /* Status call csCode's to the ez_adsp driver */
-
-
- #define getBuf 120
-
-
- /*
- getBuf, getBuf returns the number of bytes left to read in csParam[0]-[1],
- csParam[2] contains the connection state (2 = waiting for a connection,
- 3 = opening a connection, 4 = connection opened, 5 = closing a connection,
- 6 = connection closed and no waiting)
- csParam[3] conatins the userFlags, csParam[4] the attention code (if any)
- and csParam[5]-[6] a pointer to the attention data. Normally you will only
- look at csParam[0]-[1].
- */
-